package com.ss.isc.data.process.mapper;

import com.ss.isc.data.process.common.dto.VehicleDTO;
import com.ss.isc.data.process.common.model.Vehicle;
import com.ss.isc.data.process.common.model.VehicleDiscovery;
import com.ss.isc.data.process.common.model.VehicleLeave;
import com.ss.isc.data.process.common.model.VehicleRecord;
import com.ss.isc.data.process.common.model.VehicleRetation;
import com.ss.isc.data.process.common.web.VehicleVO;
import com.ss.mapper.CWMapper;
import com.github.pagehelper.Page;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

/**
 * VehicleProcessMapper
 * @author FrancisYs
 * @date 2019/8/26
 * @email yaoshuai@ss-cas.com
 */
@Repository
@Mapper
public interface VehicleProcessMapper extends CWMapper<Vehicle> {

    /**
     * 车辆感知发现分页列表
     * @param vehicle
     * @return
     */
    List<VehicleDiscovery> discoveryList(VehicleVO vehicle);

    int discoveryDays(VehicleDTO paramVehicleDTO);

    /**
     * 查询过车记录
     * @param paramVehicleDTO
     * @return
     */
    List<VehicleRecord> recordList(VehicleDTO paramVehicleDTO);

    void updateDiscovery(Vehicle paramVehicle);

    void insertVehicle(Vehicle paramVehicle);

    /**
     * 车辆感知离开分页列表
     * @param vehicle
     * @return
     */
    List<VehicleLeave> leaveList(VehicleVO vehicle);

    /**
     * 车辆滞留分页列表
     * @param vehicle
     * @return
     */
    Page<VehicleRetation> retationList(VehicleVO vehicle);

    void updateLeave(Vehicle paramVehicle);

    void updateVehicle(Vehicle paramVehicle);

    void updateRetation(Vehicle paramVehicle);

    Vehicle existVehicle(Vehicle paramVehicle);

    List<VehicleRecord> lastInOutTime(VehicleDTO paramVehicleDTO);

    VehicleDiscovery discoveryDetail(VehicleDTO paramVehicleDTO);

}
